package cn.org.eshow.webapp.action.response;

import cn.org.eshow.model.Bill;

import java.util.Date;

/**
 * 账单返回对象
 */
public class BillResponse {

    private Integer id;// 账单ID
    private Date addTime;//添加时间
    private String no;//订单号
    private String category;//账单分类（用户，店铺，平台）
    private String type;//类型（店铺提现，消费支出，消费退款，订单结算，返点）
    private Double receive;//收到金额
    private Double outlay;//支出金额
    private Double balance;//账户余额
    private String img;//图片地址
    private String orderType;//外部订单类型
    private String orderNo;//外部订单号
    private Integer state;//状态（0未完成，1已成功）
    private String remark;//备注

    public BillResponse() {
    }

    public BillResponse(Bill bill) {
        this.id = bill.getId();
        this.addTime = bill.getAddTime();
        this.no = bill.getNo() == null ? "" : bill.getNo();
        this.category = bill.getCategory() == null ? "" : bill.getCategory();
        this.type = bill.getType() == null ? "" : bill.getType();
        this.receive = bill.getReceive() == null ? 0 : bill.getReceive();
        this.outlay = bill.getOutlay() == null ? 0 : bill.getOutlay();
        this.balance = bill.getBalance() == null ? 0 : bill.getBalance();
        this.img = bill.getImg() == null ? "" : bill.getImg();
        this.orderType = bill.getOrderType() == null ? "" : bill.getOrderType();
        this.orderNo = bill.getOrderNo() == null ? "" : bill.getOrderNo();
        this.state = bill.getState() == null ? 0 : bill.getState();
        this.remark = bill.getRemark() == null ? "" : bill.getRemark();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Double getReceive() {
        return receive;
    }

    public void setReceive(Double receive) {
        this.receive = receive;
    }

    public Double getOutlay() {
        return outlay;
    }

    public void setOutlay(Double outlay) {
        this.outlay = outlay;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

}
